

//获取时间公共函数

export default () => {
  const data = new Date();
  let minute = ""
  let year = data.getFullYear(),
    month = data.getMonth() + 1,
    day = data.getDate(),
    week = data.getDay(),
    colck = data.getHours(),
    minutes = data.getMinutes();
  if (minutes < 10) {
    console.log(minutes)
    minute = "0"
  }
  return {
    month: year + "年" + month + "月" + day + "日",
    time: colck + ":" + minute + minutes,
    week: "星期" + week
  }
}